package com.goldgov.information.service;
public enum CrawlerValueTempletEnum {
	
	//爬虫模板
	URL1("http://dangjian.people.com.cn/GB/137688/"),
	URL2("http://dangjian.people.com.cn/GB/399416/399418/"),
	URL3("http://dangjian.people.com.cn/GB/394443/index.html"),
	URL4("http://dangjian.people.com.cn/GB/399416/399421/"),
	;
	
	private String url;
	CrawlerValueTempletEnum(String url){
		setUrl(url);
	}
	
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	//根据参数返回实例
	public static CrawlerValueTempletEnum val(String operate) {
        for(CrawlerValueTempletEnum s : values()) {    //values()方法返回enum所有实例
            if(operate.equals(s.getUrl()))
                return s;
        }
        return null;
    }
}